#include "process.h"
#include <unistd.h>

double total = 1024.0;
double speed = 2.0;

void DownLoad() {
    double temp = 0;
    while(temp <= total) {
        FlushProcess(total, temp);
        usleep(30000); // 计算的是微妙，这里就是3毫秒，模拟下载过程
        temp += speed;
    }
    printf("\ndownload %.1lfMB Down\n", total);
}

int main() {
    DownLoad();
    return 0;
}